<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
  <title>供应商列表</title>
</head>
<body>
<div class="container mt-4">
  <h2 class="mb-4">供应商管理</h2>
  <!-- 添加、删除的按钮 -->
  <div style="float: right; margin: 10px 0px;">
    <a href="${pageContext.request.contextPath}/shang/tiao" class="btn btn-success">增加</a>
  </div>
  <table class="table table-striped table-hover">
    <thead class="table-dark">
    <tr>
      <th>供应商ID</th>
      <th>供应商名称</th>
      <th>供应商地址</th>
      <th>供应商电话</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${list}" var="gyshang">
      <tr>
        <td>${gyshang.id}</td>
        <td>${gyshang.name}</td>
        <td>${gyshang.dizhi}</td>
        <td>${gyshang.phone}</td>
        <td>
          <a href="${pageContext.request.contextPath}/shang/delete/?id=${gyshang.id}" class="btn btn-danger">删除</a>
          <a href="${pageContext.request.contextPath}/shang/huixian/?id=${gyshang.id}" class="btn btn-primary">修改</a>
        </td>
      </tr>
    </c:forEach>
    </tbody>
  </table>
</div>
<script src="${pageContext.request.contextPath}/js/bootstrap.bundle.min.js"></script>
</body>
</html>